#include "raw.h"
#include "../texture.h"
#include <stdlib.h>

namespace sleek
{
    namespace texture
    {
        texture* LoadTextureFromRaw(core::math::vector2du size, core::u32 format, void *buffer)
        {
            texture *raw = new texture(size, (TextureFormat)format);
                memcpy(raw->buffer, buffer, size.width*size.height);
            raw->GenerateGlTexture();
            return raw;
        }
    }
}
